package com.dream.designpattern.single;

/**
 * @author wenpan
 */
public class Singleton_2 {
    private volatile static Singleton_2 INSTANCE;

    private Singleton_2() {}

    public static Singleton_2 getInstance() {
        // d c l
        if (INSTANCE == null) {
            synchronized (Singleton_2.class) {
                if (INSTANCE == null) {
                    INSTANCE = new Singleton_2();
                }
            }
        }
        return INSTANCE;
    }
}
